﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace DuMez.WEB
{
    public partial class DuMez : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsAuthenticated())
            {
                Response.Redirect("giris.aspx");
            }
            else
            {
                //int MezunId = Convert.ToInt32(Session["MezunId"]);
                //Mezun mezuns = new Mezun();
                //DataRow dr = mezuns.GetSpecificMezun(MezunId);
                //mezuns.Ad = dr[0].ToString();
                //mezuns.Soyad = dr[1].ToString();
                //lblMezun.Text = mezuns.Ad.Trim() + " " + mezuns.Soyad.Trim();
            }
        }

        public static bool IsAuthenticated()
        {
            bool deger = false;
            if (HttpContext.Current.Session["MezunId"] != null)
                deger = true;
            return deger;
        }
    }
}